﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Panelgroup : MonoBehaviour
{
    /// <summary>
    /// 根据id显示当前选项卡
    /// </summary>
    public int id;
    private CanvasGroup canvasGroup;
    private void OnEnable()
    {
        if(canvasGroup == null)
        {
            canvasGroup = gameObject.AddComponent<CanvasGroup>();
        }
    }

    public void show()
    {
        this.gameObject.SetActive(true);
        //canvasGroup.alpha = 1;
        //canvasGroup.interactable = true;
        //canvasGroup.blocksRaycasts = true;
    }

    public void hide()
    {
        this.gameObject.SetActive(false);
        //canvasGroup.alpha = 0;
        //canvasGroup.interactable = false;
        //canvasGroup.blocksRaycasts = false;
    }
}
